import request from '@/utils/request'

// 查询需求详情列表
export function listMenNeedInfo(query) {
  return request({
    url: '/men/menNeedInfo/list',
    method: 'get',
    params: query
  })
}

// 查询需求详情详细
export function getMenNeedInfo(id) {
  return request({
    url: '/men/menNeedInfo/' + id,
    method: 'get'
  })
}


// 查询需求领取人详情
export function getMenNeedUser(id) {
  return request({
    url: '/men/menNeedUser/needId/' + id,
    method: 'get'
  })
}


// 新增需求详情
export function addMenNeedInfo(data) {
  return request({
    url: '/men/menNeedInfo',
    method: 'post',
    data: data
  })
}

// 修改需求详情
export function updateMenNeedInfo(data) {
  return request({
    url: '/men/menNeedInfo',
    method: 'put',
    data: data
  })
}


// 上架
export function putMenNeedInfo(id) {
  return request({
    url: '/men/menNeedInfo/put/' + id,
    method: 'put'
  })
}


// 下架
export function underMenNeedInfo(id) {
  return request({
    url: '/men/menNeedInfo/under/' + id,
    method: 'put'
  })
}


// 删除需求详情
export function delMenNeedInfo(id) {
  return request({
    url: '/men/menNeedInfo/' + id,
    method: 'delete'
  })
}

// 导出需求详情
export function exportMenNeedInfo(query) {
  return request({
    url: '/men/menNeedInfo/export',
    method: 'get',
    params: query
  })
}